﻿using In66.Net.Share.Authentication.JwtBearer;

namespace In66.Net.Share.Registrar.WebRegistrar
{
    /// <summary>
    /// ServiceRegistrar
    /// </summary>
    public static partial class ServiceRegistrar
    {
        /// <summary>
        /// 注册配置类到IOC容器
        /// </summary>
        public static IServiceCollection ConfigureConfig(this IServiceCollection Services, IConfiguration Configuration, IServiceInfo ServiceInfo)
        {
            Services
                .Configure<CorsConfig>(Configuration.GetSection(CorsConfig.Name))
                .Configure<JwtConfig>(Configuration.GetSection(JwtConfig.Name))
                .Configure<ThreadPoolConfig>(Configuration.GetSection(ThreadPoolConfig.Name));
            return Services;
        }
    }
}
